package com.shanyi.sendmsg.task;

import com.shanyi.sendmsg.biz.SendMsgBiz;
import com.shanyi.sendmsg.biz.SendWeixinMsgBiz;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class TimeTask {

    @Resource
    private SendMsgBiz sendMsgBiz;
    
    @Resource
    private SendWeixinMsgBiz sendWeixinMsgBiz;

    @Scheduled(cron = "0 0 8 * * ? ")
    public void sendMsg() {
        sendMsgBiz.sendMsgBiz();
    }
    
    @Scheduled(cron = "0 0 8 * * ? ")
    public void sendWeixinMsg() {
        sendWeixinMsgBiz.sendWeixinMsg();
    }
}
